package com.changgou.order.feign;

import com.changgou.entity.Result;
import com.changgou.order.pojo.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @description:
 * @author: 大佬味的小男孩
 * @date: 2020-08-03 15:02
 **/
@FeignClient(name = "order")
public interface OrderFeign {
    @PostMapping("/order/add")
    public Result add(@RequestBody Order order);


    @GetMapping("/order/{id}")
    public Result<Order> findById(@PathVariable("id") String id);
}
